home *** CD-ROM | disk | FTP | other *** search
Wrap
// Visual IRC '97 standard event/alias/menu library // Version 1.00 Name ViRC '97 1.00 event/alias/menu library // Events Event <default> "*" // This event is handled internally. // Default server text is displayed // automatically by ViRC '97. EndEvent Event <OnStart> "*" // This event is fired when ViRC '97 starts up. EndEvent Event <OnClose> "*" // This event is fired when ViRC '97 closes down. EndEvent Event <OnConnect> "*" // This event is fired on connection to the server. EndEvent Event <OnDisconnect> "*" // This event is fired on disconnection from the server. if ($ChannelCount() > 0) TextOut ecError *** Disconnected from server \b$server\b. endif EndEvent Event <OnNotifyJoin> "*" TextOut > . ecNOTICE *** Notify: $0 is on IRC EndEvent Event <OnNotifyQuit> "*" TextOut > . ecNOTICE *** Notify: $0 has quit IRC EndEvent Event <OnNewInactiveText> "*" // This event is fired when a line of text is added // to a window that doesn't have the focus. EndEvent Event <OnDCCChatConnect> "*" // Fired when a DCC Chat session connects. // The nick is in $0. EndEvent Event <OnDCCChatDisconnect> "*" // Fired when a DCC Chat session disconnects. // The nick is in $0. EndEvent Event <OnDCCChatText> "*" // Fired when new DCC Chat text comes in. // The nick is in $0. The text is in $1-. EndEvent Event <OnDCCSendConnect> "*" // Fired when a DCC Send session connects. // The nick is in $0. The filename is in $1-. EndEvent Event <OnDCCSendDisconnect> "*" // Fired when a DCC Send session disconnects. // The nick is in $0. The filename is in $1-. // $2 contains 1 if the transfer completed successfully, 0 otherwise. EndEvent Event <OnDCCGetConnect> "*" // Fired when a DCC Get session connects. // The nick is in $0. The filename is in $1-. EndEvent Event <OnDCCGetDisconnect> "*" // Fired when a DCC Get session disconnects. // The nick is in $0. The filename is in $1-. // $2 contains 1 if the transfer completed successfully, 0 otherwise. EndEvent Event <OnNewUserConnect> "*" TextOutBitmap > . ecServText $bitmap(_face.bmp) Welcome to the all-new $char(3)1,9Visual IRC '97$char(3)! If you have any problems with the client, then click on the hyperlink to join the #virc channel. Remember to visit http://www.megalith.co.uk/virc and http://www.virc.com frequently for the latest versions too!! EndEvent Event RawServerNotice "NOTICE *" TextOut > . ecError *** [\bRAW\b] $2- EndEvent Event JOIN "* JOIN" TextOutBitmap > $2 ecJOIN $bitmap(_join.bmp) *** \b$nick ($user@$host)\b has joined channel $2 if ($GetBanlevel($nick!$user@$host) >= 1) Bk $2 $nick You're not welcome here!! (banlevel = $GetBanlevel($nick!$user@$host)) endif if ($GetUserlevel($nick!$user@$host) >= 1) Mode $2 +o $nick endif EndEvent Event PART "* PART" if ([$nick] != [$N]) TextOutBitmap > $2 ecPART $bitmap(_part.bmp) *** \b$nick ($user@$host)\b has left channel $2 endif EndEvent Event QUIT "* QUIT" for (@l $i = 1; $i <= $channelcount(); $i++) if ($ison($nick $channels($i))) TextOutBitmap > $channels($i) ecQUIT $bitmap(_quit.bmp) *** Signoff: \b$nick ($user@$host)\b has left IRC [$2-] endif endfor EndEvent Event TOPIC "* TOPIC" TextOut > $2 ecTOPIC *** \b$nick\b has changed the topic on $2 to "$StrTrim($3-)" EndEvent Event MODE "* MODE" TextOutBitmap > $2 ecMODE $bitmap(_mode.bmp) *** Mode change [$3-] on channel $2 by \b$nick\b EndEvent Event INVITE "* INVITE" TextOut ecNotice *** \b$nick ($user@$host)\b invites you to channel $StrTrim($3-) EndEvent Event WALLOPS "* WALLOPS" TextOut > . ecNotice !\b$nick\b!\t$StrTrim($2-) EndEvent Event ChannelMessage "* PRIVMSG #*" TextOut > $2 ecChanText <\b$nick\b>\t$StrTrim($3-) EndEvent Event LocalChannelMessage "* PRIVMSG &*" TextOut > $2 ecChanText <\b$nick\b>\t$StrTrim($3-) EndEvent Event CTCP "* PRIVMSG * :\A*" TextOut ecCTCP *** Received CTCP $Upper($StrTrim($3)) from \b$nick\b: $4- EndEvent Event ChannelNotice "* NOTICE #*" TextOut > $2 ecNOTICE =\b$nick\b=\t$StrTrim($3-) EndEvent Event LocalChannelNotice "* NOTICE &*" TextOut > $2 ecNOTICE =\b$nick\b=\t$StrTrim($3-) EndEvent Event PrivateNotice "* NOTICE *" if ($StrPos(. $nick) > 0) TextOut > . ecNOTICE =\b$nick\b=\t$StrTrim($3-) else TextOut ecNOTICE =\b$nick\b=\t$StrTrim($3-) endif EndEvent Event CTCPReply "* NOTICE * :\A*" TextOut ecCTCP *** Received CTCP $Upper($StrTrim($3)) reply from \b$nick\b: $4- EndEvent Event KICK "* KICK *" TextOut > $2 ecKICK *** \b$nick\b has kicked \b$3\b from channel $2 [$StrTrim($4-)] EndEvent Event NICK "* NICK" for (@l $i = 1; $i <= $channelcount(); $i++) if ($ison($nick $channels($i))) TextOut > $channels($i) ecNICK *** \b$nick\b is now known as \b$2\b endif endfor EndEvent Event PrivateMessage "* PRIVMSG *" if ($GetSetting(Options QueryEnabled)) || ($IsQuerying($nick)) TextOut > $nick ecQueryText <\b$nick\b>\t$StrTrim($3-) else TextOut ecPRIVMSG *\b$nick\b*\t$StrTrim($3-) endif EndEvent Event ChannelAction "* PRIVMSG #* :\AACTION" TextOut > $2 ecACTION * \b$nick\b $4- EndEvent Event LocalChannelAction "* PRIVMSG &* :\AACTION" TextOut > $2 ecACTION * \b$nick\b $4- EndEvent Event PrivateAction "* PRIVMSG * :\AACTION" if ($GetSetting(Options QueryEnabled)) || ($IsQuerying($nick)) TextOut > $nick ecACTION *> \b$nick\b $4- else TextOut ecACTION *> \b$nick\b $4- endif EndEvent Event PingReply "* NOTICE * :\APING" TextOut ecCTCP *** Received CTCP $StrTrim($3) reply from \b$nick\b: $DecodePingInterval($4) EndEvent Event Ping "* PRIVMSG * :\APING" // Don't display anything when a ping // comes in. EndEvent Event 471 "* 471 *" TextOut > $3 ecError *** Cannot join channel $3 (+l - channel is full) EndEvent Event 473 "* 473 *" TextOut > $3 ecError *** Cannot join channel $3 (+i - invite-only) EndEvent Event 474 "* 474 *" TextOut > $3 ecError *** Cannot join channel $3 (+b - you're banned) EndEvent Event 475 "* 475 *" TextOut > $3 ecError *** Cannot join channel $3 (+k - channel key is set) EndEvent // Aliases Alias J if ([$1] == []) @l $x = $?="Enter a channel name to join:" else @l $x = $1- endif if ([$substr($x 1 1)] != [#]) && ([$substr($x 1 1)] != [&]) @l $x = #$x endif Join $x EndAlias Alias OP if ([$1] == []) Mode $C +oooo $?="Enter some nicks to op:" else Mode $C +oooo $1- endif EndAlias Alias DEOP if ([$1] == []) Mode $C -oooo $?="Enter some nicks to deop:" else Mode $C -oooo $1- endif EndAlias // Menus and popups MenuTree MT_MainMenu M_FILE <none> 0 0 &File M_NEWCONNECT Ctrl+S 0 1 &New connection ... M_SETUP <none> 0 1 Client s&etup ... M_FSEP1 <none> 0 1 - M_EXIT Alt+X 0 1 E&xit M_TOOLS <none> 0 0 &Tools M_FINGER Ctrl+F 0 1 UNIX &finger ... M_DNS Ctrl+L 0 1 &DNS lookup ... M_TSEP1 <none> 0 1 - M_LINKS <none> 1 1 &Links M_CHANLIST <none> 1 1 &Channel list ... M_TSEP2 <none> 0 1 - M_EXPLORE Ctrl+E 0 1 &Explore ... M_SCRIPTING <none> 0 0 &Scripting M_EVENTS <none> 0 1 &Events ... M_ALIASES <none> 0 1 &Aliases ... M_MENUS <none> 0 1 &Menus/popups ... M_SCRSEP1 <none> 0 1 - M_LOAD <none> 0 1 &Load script ... M_SCRSEP2 <none> 0 1 - M_VSPUBWIZ <none> 0 1 &ViRCScript Publishing Wizard ... EndMenuTree MenuTree MT_ServerPopup M_BUFFER <none> 0 0 &Buffer M_BUFFERSAVE <none> 0 1 &Save ... M_BUFFERCLEAR <none> 0 1 &Clear M_SSEP1 <none> 0 0 - M_SCONNECT <none> 2 0 Co&nnect M_SDISCONNECT <none> 1 0 &Disconnect M_SSEP2 <none> 0 0 - M_SIGNOFF <none> 1 0 &Signoff ... EndMenuTree MenuTree MT_ChannelTextPopup M_BUFFER <none> 0 0 &Buffer M_BUFFERSAVE <none> 0 1 &Save ... M_BUFFERCLEAR <none> 0 1 &Clear M_CSEP1 <none> 0 0 - M_CHANINFO <none> 0 0 C&hannel control ... M_CSEP2 <none> 0 0 - M_OFFERXDCC <none> 0 0 &Offer XDCC packs M_WHOLIST <none> 0 0 &Who list ... EndMenuTree MenuTree MT_ChannelNicksPopup M_WHOIS <none> 0 0 &Whois (user info) M_QUERY <none> 0 0 &Query (private message window) M_SEP1 <none> 0 0 - M_DCCCHAT <none> 0 0 DCC &Chat M_DCCSEND <none> 0 0 DCC &Send ... M_DCCWBOARD <none> 0 0 DCC &Whiteboard ... M_TDCCSEND <none> 0 0 TDCC S&end ... M_TDCCVOICE <none> 0 0 TDCC &Voice ... M_TDCCVIDEO <none> 0 0 TDCC V&ideo ... M_SEP2 <none> 0 0 - M_CTCP <none> 0 0 C&TCP M_CPING <none> 0 1 &PING M_CVERSION <none> 0 1 &VERSION M_CTIME <none> 0 1 &TIME M_SEP3 <none> 0 0 - M_OP <none> 1 0 &Op M_DEOP <none> 1 0 &Deop M_KICK <none> 1 0 &Kick M_BAN <none> 1 0 &Ban M_KICKBAN <none> 1 0 K&ickban EndMenuTree MenuTree MT_QueryTextPopup M_WHOIS <none> 0 0 &Whois (user info) M_SEP1 <none> 0 0 - M_DCCCHAT <none> 0 0 DCC &Chat M_DCCSEND <none> 0 0 DCC &Send ... M_DCCWBOARD <none> 0 0 DCC &Whiteboard ... M_TDCCSEND <none> 0 0 TDCC S&end ... M_TDCCVOICE <none> 0 0 TDCC &Voice ... M_TDCCVIDEO <none> 0 0 TDCC V&ideo ... M_SEP2 <none> 0 0 - M_CTCP <none> 0 0 C&TCP M_CPING <none> 0 1 &PING M_CVERSION <none> 0 1 &VERSION M_CTIME <none> 0 1 &TIME M_SEP2 <none> 0 0 - M_TEST1 <none> 0 0 &Example query menu script EndMenuTree MenuItem M_FILE on MT_MainMenu EndMenuItem MenuItem M_NEWCONNECT on MT_MainMenu NewServerWindow EndMenuItem MenuItem M_SETUP on MT_MainMenu ShowClientSetup EndMenuItem MenuItem M_FSEP1 on MT_MainMenu EndMenuItem MenuItem M_EXIT on MT_MainMenu Exit EndMenuItem MenuItem M_TOOLS on MT_MainMenu EndMenuItem MenuItem M_FINGER on MT_MainMenu Finger EndMenuItem MenuItem M_DNS on MT_MainMenu @l $x = $?="Enter a hostname to DNS lookup:" if ([$x] != []) DNS $x endif EndMenuItem MenuItem M_TSEP1 on MT_MainMenu EndMenuItem MenuItem M_LINKS on MT_MainMenu Links EndMenuItem MenuItem M_CHANLIST on MT_MainMenu List EndMenuItem MenuItem M_TSEP2 on MT_MainMenu EndMenuItem MenuItem M_EXPLORE on MT_MainMenu Explore EndMenuItem MenuItem M_SCRIPTING on MT_MainMenu EndMenuItem MenuItem M_EVENTS on MT_MainMenu ShowEventEditor EndMenuItem MenuItem M_ALIASES on MT_MainMenu ShowAliasEditor EndMenuItem MenuItem M_MENUS on MT_MainMenu ShowMenuEditor EndMenuItem MenuItem M_LOAD on MT_MainMenu @l $x = $opendialog(Load a ViRCScript script file|ViRCScript script (*.vsc)|*.vsc|All files (*.*)|*.*) if ([$x] != []) Load "$x" endif EndMenuItem MenuItem M_VSPUBWIZ on MT_MainMenu ShowViRCScriptPublishingWizard EndMenuItem MenuItem M_BUFFER on MT_ServerPopup EndMenuItem MenuItem M_BUFFERSAVE on MT_ServerPopup @l $x = $savedialog(Append window buffer to a file|All files (*.*)|*.*) @l $y = $mapobject(.:tbServerText) AppendText "$x" $prop($y.Text) UnmapObject $y EndMenuItem MenuItem M_BUFFERCLEAR on MT_ServerPopup @l $x = $mapobject(.:tbServerText) $x.Clear UnmapObject $x EndMenuItem MenuItem M_SSEP1 on MT_ServerPopup EndMenuItem MenuItem M_SCONNECT on MT_ServerPopup Connect EndMenuItem MenuItem M_SDISCONNECT on MT_ServerPopup Disconnect EndMenuItem MenuItem M_SSEP1 on MT_ServerPopup EndMenuItem MenuItem M_SIGNOFF on MT_ServerPopup @ $x = $?="Enter a signoff quote, or just press Enter." if ([$x] != []) Quit $x else Quit \b[=\uV97\u=]\b Leaving endif EndMenuItem MenuItem M_BUFFER on MT_ChannelTextPopup EndMenuItem MenuItem M_BUFFERSAVE on MT_ChannelTextPopup @l $x = $savedialog(Append window buffer to a file|All files (*.*)|*.*) @l $y = $mapobject($C:tbChannelText) AppendText "$x" $prop($y.Text) UnmapObject $y EndMenuItem MenuItem M_BUFFERCLEAR on MT_ChannelTextPopup @l $x = $mapobject($C:tbChannelText) $x.Clear UnmapObject $x EndMenuItem MenuItem M_CSEP1 on MT_ChannelTextPopup EndMenuItem MenuItem M_CHANINFO on MT_ChannelTextPopup ChannelControl EndMenuItem MenuItem M_CSEP2 on MT_ChannelTextPopup EndMenuItem MenuItem M_OFFERXDCC on MT_ChannelTextPopup XDCC EndMenuItem MenuItem M_WHOLIST on MT_ChannelTextPopup WWho EndMenuItem MenuItem M_WHOIS on MT_ChannelNicksPopup Whois $nick EndMenuItem MenuItem M_QUERY on MT_ChannelNicksPopup ForEach ($nick;$1-) Query $nick EndForEach EndMenuItem MenuItem M_SEP1 on MT_ChannelNicksPopup EndMenuItem MenuItem M_DCCCHAT on MT_ChannelNicksPopup ForEach ($nick;$1-) DCC Chat $nick EndForEach EndMenuItem MenuItem M_DCCSEND on MT_ChannelNicksPopup ForEach ($nick;$1-) DCC Send $nick EndForEach EndMenuItem MenuItem M_DCCWBOARD on MT_ChannelNicksPopup ForEach ($nick;$1-) DCC Whiteboard $nick EndForEach EndMenuItem MenuItem M_TDCCSEND on MT_ChannelNicksPopup ForEach ($nick;$1-) TDCC Send $nick EndForEach EndMenuItem MenuItem M_TDCCVOICE on MT_ChannelNicksPopup ForEach ($nick;$1-) TDCC Voice $nick EndForEach EndMenuItem MenuItem M_TDCCVIDEO on MT_ChannelNicksPopup ForEach ($nick;$1-) TDCC Video $nick EndForEach EndMenuItem MenuItem M_SEP2 on MT_ChannelNicksPopup EndMenuItem MenuItem M_CTCP on MT_ChannelNicksPopup EndMenuItem MenuItem M_CPING on MT_ChannelNicksPopup ForEach ($nick;$1-) Ping $nick EndForEach EndMenuItem MenuItem M_CVERSION on MT_ChannelNicksPopup ForEach ($nick;$1-) CTCP $nick VERSION EndForEach EndMenuItem MenuItem M_CTIME on MT_ChannelNicksPopup ForEach ($nick;$1-) CTCP $nick TIME EndForEach EndMenuItem MenuItem M_SEP3 on MT_ChannelNicksPopup EndMenuItem MenuItem M_OP on MT_ChannelNicksPopup ForEach ($nick1,$nick2,$nick3;$1-) Mode $C +ooo $nick1 $nick2 $nick3 EndForEach EndMenuItem MenuItem M_DEOP on MT_ChannelNicksPopup ForEach ($nick1,$nick2,$nick3;$1-) Mode $C -ooo $nick1 $nick2 $nick3 EndForEach EndMenuItem MenuItem M_KICK on MT_ChannelNicksPopup ForEach ($nick;$1-) Kick $C $nick EndForEach EndMenuItem MenuItem M_BAN on MT_ChannelNicksPopup ForEach ($nick;$1-) Ban $C $nick EndForEach EndMenuItem MenuItem M_KICKBAN on MT_ChannelNicksPopup ForEach ($nick;$1-) BK $C $nick EndForEach EndMenuItem MenuItem M_TEST1 on MT_QueryTextPopup Desc $nick I'm using \bVisual IRC '97 $ver\b. Get your copy today from www.virc.com!! EndMenuItem MenuItem M_WHOIS on MT_QueryTextPopup Whois $nick EndMenuItem MenuItem M_SEP1 on MT_QueryTextPopup EndMenuItem MenuItem M_DCCCHAT on MT_QueryTextPopup DCC Chat $nick EndMenuItem MenuItem M_DCCSEND on MT_QueryTextPopup DCC Send $nick EndMenuItem MenuItem M_DCCWBOARD on MT_QueryTextPopup DCC Whiteboard $nick EndMenuItem MenuItem M_TDCCSEND on MT_QueryTextPopup TDCC Send $nick EndMenuItem MenuItem M_TDCCVOICE on MT_QueryTextPopup TDCC Voice $nick EndMenuItem MenuItem M_TDCCVIDEO on MT_QueryTextPopup TDCC Video $nick EndMenuItem MenuItem M_SEP2 on MT_QueryTextPopup EndMenuItem MenuItem M_CTCP on MT_QueryTextPopup EndMenuItem MenuItem M_CPING on MT_QueryTextPopup Ping $nick EndMenuItem MenuItem M_CVERSION on MT_QueryTextPopup CTCP $nick VERSION EndMenuItem MenuItem M_CTIME on MT_QueryTextPopup CTCP $nick TIME EndMenuItem UpdateMenus